﻿using System;

class SolveQuadraticEquation
{
    static void Main()
    {
        int firstNumber;
        int secondNumber;
        int thirdNumber;

        Console.WriteLine("Type a:");
        bool isFirstNumberValid = int.TryParse(Console.ReadLine(), out firstNumber);
        Console.WriteLine("Type b:");
        bool isSecondNumberValid = int.TryParse(Console.ReadLine(), out secondNumber);
        Console.WriteLine("Type c:");
        bool isThirdNumberValid = int.TryParse(Console.ReadLine(), out thirdNumber);

        if (isFirstNumberValid && isSecondNumberValid && isThirdNumberValid)
        {
            double x1 = (-secondNumber + Math.Sqrt(secondNumber * secondNumber - 4 * firstNumber * thirdNumber)) / (2 * firstNumber);
            double x2 = (-secondNumber - Math.Sqrt(secondNumber * secondNumber - 4 * firstNumber * thirdNumber)) / (2 * firstNumber);
            Console.WriteLine("The roots are {0} and {1}", x1, x2);
        }
        else
        {
            Console.WriteLine("Your input isn`t OK!!!");
        }
    }
}